package com.lifuixng.demo.day4carsystem.entity;

/**
 * 巴士
 */
public class Bus extends Vehicle {

    public Bus(String number, String type, float price, String color, float gasValue, int seats) {
        super(number, type, price, color, gasValue);
        this.seats = seats;
    }

    public Bus() {
    }

    private int seats;

    public int getSeats() {
        return seats;
    }

    public void setSeats(int seats) {
        this.seats = seats;
    }

    @Override
    public float calculateRentPrice(int days) {
        return 1000 * days + seats * 50;
    }

    @Override
    public void print() {
        System.out.println("巴士 车牌号：" + this.getNumber() +",颜色：" + this.getColor() +",型号：" + this.getType() +
                ",价格：" + this.getPrice() +",座位数：" + this.getSeats());
    }
}
